import QMFetch from 'api/index';
/**
 * 文章和文章栏目共享的api
 */
class WebApi {

    /**
     * 查询文章栏目列表
     */
    fetchArticleSections = () => QMFetch({
                url: 'article_column/list',
                method: 'POST',
                body: {}
            }
        )
    
    /**
     * 新增|修改文章
     * @param article 文章
     */
    submitArticle = (article) => {
        return QMFetch({
            url: "article/save",
            method:"POST",
            body:article
        })
    }

    fetchDomain = () => {
        return QMFetch({
            url:"domain/list",
            method:"POST",
            body: ['c']
        })
    }
}

export default WebApi;